<%-- 
    Document   : import
    Created on : Jan 10, 2012, 11:46:07 AM
    Author     : olivier
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="/struts-tags" prefix="s" %>

<br/>
<table>
    <tr>
        <td>
            <img src="<s:url value="/img/icons/users_into_big.png"/>"> 
        </td>
        <td>
            <span class="title">
               Import students
            </span>
        </td>
    </tr>
</table>
<br/><br/>

<c:if test="${!empty usersImported}">
    <div style="border:2px solid #00CC00;padding:10px;margin:10px;">
        <s:iterator var="name" value="usersImported"> 
            <s:property value="name"/> imported!<br/>
        </s:iterator>
    </div>
</c:if>

<c:if test="${!empty usersNotImported}">
    <div style="border:2px solid #CC0000;padding:10px;margin:10px;">
        <s:iterator var="name" value="usersNotImported"> 
            <s:property value="name"/> could not be imported!<br/>
        </s:iterator>
    </div>
</c:if>

<s:form namespace="/user" action="importDone" enctype="multipart/form-data">
    <table>
        <tr>
            <td>CSV file to import:</td>
            <td><s:file name="usersfile"/></td>
        </tr>
        <tr>
            <td colspan="2">
                <input type="submit" value="Upload"/>
            </td>
        </tr>
    </table>

</s:form>

